package com.example.kt_fast.wedget

import android.content.Context
import android.util.AttributeSet
import androidx.constraintlayout.widget.ConstraintLayout

/**
 * Created by 小陈 on 2025/3/25.
 * Time: 12:21.
 */
class SquareLayout @JvmOverloads constructor(
    context: Context,
    attrs: AttributeSet? = null,
    defStyleAttr: Int = 0
) : ConstraintLayout(context, attrs, defStyleAttr) {

    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
        // 强制宽高相等
        super.onMeasure(widthMeasureSpec, widthMeasureSpec)
    }
}
